#include <stdio.h>
int main()
{int i;
 int a;
 int b;
 int c;
 for(i=100;i<=999;i++)
 {a=i%10;
  b=i/10%10;
  c=i/100%10;
  if(i==a*a*a+b*b*b+c*c*c)
          printf("%d\n",i);
 }

 printf("\n");
 return 0;

}
